<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    .parent{
        /* 
        position:fixed|relative|absoulte
        相对定位就是元素在页面上的正常位置 */
        margin-left: 20px;
        width: 200px;
        height: 200px;
        background-color: red;
        position: relative;
    }
    .child{
        /* 绝对定位元素的位置是相对与给了父元素而言的 */
        width: 50px;
        height: 50px;
        background-color: yellow;
        position: absolute;
        right: 0;
        bottom: 0;
    }
    </style>
    
</head>
<body>
    <div class="parent">
     <div class="child">

     </div>
    </div>
</body>
</html>